package cn.lopr.hfbdqn.route;

import cn.lopr.hfbdqn.common.Result;
import cn.lopr.hfbdqn.pojo.Movie;
import cn.lopr.mvc.frame.annotaion.Param;
import cn.lopr.mvc.frame.annotaion.RequestBody;
import cn.lopr.mvc.frame.annotaion.Route;

/**
 * @author shuangyang7
 * @date 2021/7/19 11:24
 */
@Route("/movie")
public interface MovieRoute {
    Result<?> getAll();

    Result<?> getByHotComment();

    Result<?> getByType(@Param(paramName = "type") Integer type);

    Result<Movie> getById(@Param(paramName = "id") Integer id);

    Result<?> getByTypeAndPage(@Param(paramName = "type") Integer type,
                               @Param(paramName = "page", defaultValue = "1") Integer page,
                               @Param(paramName = "size", defaultValue = "3") Integer size);

    Result<?> getMovieImagesById(@Param(paramName = "id") Integer id);

    Result<?> search(@Param(paramName = "s") String s,
                     @Param(paramName = "page", defaultValue = "1") Integer page,
                     @Param(paramName = "size", defaultValue = "3") Integer size);


    @RequestBody
    Result<?> requestBodyTest(Movie movie);
}
